﻿#ifndef _OI_PLSCANNERCORE_DIFFVIEW_H_
#define _OI_PLSCANNERCORE_DIFFVIEW_H_

#include "PLScannerCore/OiPLScannerCore.hpp"

namespace Oi
{
    namespace PLScannerCore
    {
        class OI_PLSCANNER_CORE_API DiffView : public QGraphicsView
        {
            Q_OBJECT
        public:
            DiffView(Qt::Orientation orientation = Qt::Horizontal, QWidget* parent = NULL);

        public:
            ~DiffView();

       signals:
            void axisHasChanged();

        public slots:
           
            QList<QPointF> profile() const;
            QList<QList<QPointF>> profiles() const;

            void display(const QList<QList<QPointF>>& profiles);
            void display(const QList<QPointF>& profile);

        public slots:
            void zoomOut(double factor);
            void zoomFit();

        protected:
            void mousePressEvent(QMouseEvent *event);
            void mouseReleaseEvent(QMouseEvent *event);
            void mouseMoveEvent(QMouseEvent *event);
            void mouseDoubleClickEvent(QMouseEvent *event);
            void wheelEvent(QWheelEvent *event);
            void resizeEvent(QResizeEvent *event);
            void paintEvent(QPaintEvent *event);
            void showEvent(QShowEvent *event);
            void hideEvent(QHideEvent *event);


        private:
            OI_DISABLE_COPY(DiffView);
            OI_DECLARE_IMPL(DiffView);
        };

    }
}

#endif
